//tab面板的切换
$('#zksq_tabs').tabs({
    border:false,
    onSelect:function (title) {
        if (title == "转库打印") {
            $.ajax({
                type:"POST",
                url:$.webPath() + '/kcgl/zksq/zksq_print_detail?zkdId=' + $("[name='zkd.id']").val(),
                dataType:"html",
                beforeSend:function () {
                    $.messager.progress();
                },
                success:function (data) {
                    $.messager.progress("close");
                    $('#zksq_content_id').html(data);
                }
            });
        }
    }
});

function zksqPrintPreview() {
    var LODOP = getLodop(document.getElementById('LODOP_OB_ZKSQ'), document.getElementById('LODOP_EM_ZKSQ'));
    LODOP.SET_PRINT_STYLEA(0, "NotOnlyHighPrecision", true);
    LODOP.PRINT_INIT("预览转库单");

    var strBodyStyle = "<style  type=\"text/css\">" +
        ".textcon{padding:8px;}" +
        ".input-tian{border-top:0 none;border-left:0 none;border-right:0 none;border-bottom: 1px solid black;height:22px;line-height:22px;width:100%;font-weight: bold;}" +
        " select{display:none}" +
        ".tb{width:auto;border-collapse:collapse;border-spacing:0;}" +
        ".tb th{padding:2px 2px 2px 12px;font-size:12px;font-weight:normal;text-align: right;}" +
        ".tb td{padding:2px;font-size:12px;}" +
        ".tb caption{ font-size:24px;height:60px;line-height:20px;}" +
        ".intb{width: 100%;}" +
        ".intb,.intb th,.intb td{border:1px solid black;}" +
        "</style>";
    var strFormHtmltops = strBodyStyle + "<div class='textcon'>" + document.getElementById("zksq_print_id").innerHTML + "</div>";
    var strFormHtmlbodys = strBodyStyle + "<div class='textcon'>" + document.getElementById("zksq_content_id").innerHTML + "</div>";
    var strFormHtmlBottoms = strBodyStyle + "<div class='textcon'>" + document.getElementById("zksq_detail_id").innerHTML + "</div>";

    LODOP.ADD_PRINT_TABLE(140, "1.5%", "90%", 350, strFormHtmlbodys);
    LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
    LODOP.ADD_PRINT_HTM(20, "1.5%", "90%", 145, strFormHtmltops);
    LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
    LODOP.SET_PRINT_STYLEA(0, "LinkedItem", 1);
    LODOP.ADD_PRINT_HTM(495, "1.5%", "90%", 200, strFormHtmlBottoms);
    LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
    LODOP.SET_PRINT_STYLEA(0, "LinkedItem", 1);
    LODOP.ADD_PRINT_TEXT(5, "80%", 135, 20, "总页号：第#页/共&页");
    LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
    LODOP.SET_PRINT_STYLEA(0, "Horient", 1);

    LODOP.PREVIEW();


}

